###########################################################
# $Id: xrsh_targets.sh 4479 2012-12-22 13:04:08Z xrdk $
# brief	    : 
# author    : xrdk
# version   : V1.0, 2004-03-16
#
# CopyRight (C) 2004-2011 xrdk.
# All rights reserved.
###########################################################

function xrmk_target_supped()
{
	local _xrmk_arr=(rh9)
	
	if [ "$1" = "get" ]; then
		echo -T target supped: ${_xrmk_arr[*]}
	  echo "--    rh9 : compile rh9 target on rhel"
		return
	fi
	
	local _xrmk_tmp=`echo ${_xrmk_arr[*]}`
	_xrmk_tmp=`xrsh_hasitem "$_xrmk_tmp" $1`
	
	if test "$_xrmk_tmp" = "no"; then
		echo "Unsupp target: $1"
		xrmk_target_supped "get"
		exit 1
	fi
}

function xrmk_target_get()
{
	local _xrmk_tmp=$1
	case $_xrmk_tmp in
	  rh9)    xrmk_get_target_rh9  ;;
	  *)	    ;;
	esac
}
#=====================================================================
function xrmk_get_target_rh9()
{
  xrmk_cc_home=`xrsh_altval "$xrmk_cc_home" "/usr/rh9gcc"`
	xrmk_cc_home_bin=$xrmk_cc_home/bin
	xrmk_cc=$xrmk_cc_home_bin/gcc
	xrmk_cpp=$xrmk_cc_home_bin/g++
	xrmk_make=$xrmk_cc_home_bin/make
	xrmk_gmake=$xrmk_cc_home_bin/gmake
	xrmk_ar=$xrmk_cc_home_bin/ar
	
	export INCLUDE=$xrmk_cc_home/include
	export LD_LIBRARY_PATH=$xrmk_cc_home/lib
	
	xrmk_sinc="$xrmk_cc_home/include"
	xrmk_slib="$xrmk_cc_home/lib"
	
	#xrmk_lib_sys="$xrmk_cc_home/lib/libdl.so $xrmk_cc_home/lib/libpthread.so $xrmk_cc_home/lib/libm.so"
	
	xrmk_os_name="lnx"
	xrmk_os_arch="x86"
	xrmk_os_vmaj=2
	xrmk_os_vmin=4
	xrmk_os_vnum=20
	
	xrmk_os_specname=rh
	xrmk_os_specver=9
}

